/**
 * 
 */
package com.jewaton.auth.commons.dao;

import com.jewaton.auth.commons.entity.Config;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;

@Repository("configDAO")
public class ConfigDAO extends BaseDAO {
	
    
	public Config getByKey(String key) {
		String hql = "from Config c where c.key = :key";
		Query query = getSession().createQuery(hql);
		query.setString("key", key);
		return (Config) query.uniqueResult();
	}
}
